texthandle: Fix handle dragging on wayland
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 14 Oct 2015 13:53:51 +0000 (15:53 +0200)
committerCarlos Garnacho <carlosg@gnome.org>
Wed, 14 Oct 2015 16:44:34 +0000 (18:44 +0200)
commit73bf16b3b0492b6ac5e077f7179312c5090cfb6e
treeff3529d43503bc074a721c8615c4f04d25ff4dd9
parentf2b848a5319987a3b45282058cd091b3e3152652
texthandle: Fix handle dragging on wayland

Text handles are subsurfaces on wayland, so sort of their own toplevel.
This made gtk_widget_translate_coordinates() to bail out there, resulting
in text handles being mispositioned and jumpy. To fix this, translate to
toplevel GtkWindow coordinates manually, and translate coordinates from
there.

Along the way, the coordinates reported in ::handle-dragged have been
fixed so there is no small jumps in either axis (most noticeable in the
X axis when you started dragging, and in the Y axis when moving between
lines of different heights.
gtk/gtktexthandle.c